<html>
<head><meta charset="utf-8"><title>Weird unpretty-debug.rs test failure · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Weird.20unpretty-debug.2Ers.20test.20failure.html">Weird unpretty-debug.rs test failure</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="203345975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Weird%20unpretty-debug.rs%20test%20failure/near/203345975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Weird.20unpretty-debug.2Ers.20test.20failure.html#203345975">(Jul 09 2020 at 02:37)</a>:</h4>
<p>I have a commit where I added a bunch of static symbols to the list in <code>src/librustc_span/symbol.rs</code> and now I'm getting this test failure:</p>



<a name="203346018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Weird%20unpretty-debug.rs%20test%20failure/near/203346018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Weird.20unpretty-debug.2Ers.20test.20failure.html#203346018">(Jul 09 2020 at 02:38)</a>:</h4>
<div class="codehilite"><pre><span></span><code>---- [ui] ui/hygiene/unpretty-debug.rs stdout ----
diff of stdout:

10
11      macro_rules! foo /* 0#0 */ { ($ x : ident) =&gt; { y + $ x } }
12
-       fn bar /* 0#0 */() { let x /* 0#0 */ = 1; y /* 0#1 */ + x /* 0#0 */ }
+       fn bar /* 0#0 */() {
+           let x /* 0#0 */ = 1;
+           y /* 0#1 */ + x /* 0#0 */
+       }
14
15      fn y /* 0#0 */() { }
16
</code></pre></div>



<a name="203346023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Weird%20unpretty-debug.rs%20test%20failure/near/203346023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Weird.20unpretty-debug.2Ers.20test.20failure.html#203346023">(Jul 09 2020 at 02:38)</a>:</h4>
<p>Any ideas what might be going on? It's weird</p>



<a name="203347171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Weird%20unpretty-debug.rs%20test%20failure/near/203347171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Weird.20unpretty-debug.2Ers.20test.20failure.html#203347171">(Jul 09 2020 at 03:07)</a>:</h4>
<p>Aha! That test contains <code>// normalize-stdout-test "\d+#" -&gt; "0#"</code></p>



<a name="203347222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Weird%20unpretty-debug.rs%20test%20failure/near/203347222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Weird.20unpretty-debug.2Ers.20test.20failure.html#203347222">(Jul 09 2020 at 03:08)</a>:</h4>
<p>sounds like those numbers can be arbitrary. Adding some number of symbols has probably increased the number of digits in some of them, which has resulted in the formatting being different.</p>



<a name="203347225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Weird%20unpretty-debug.rs%20test%20failure/near/203347225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Weird.20unpretty-debug.2Ers.20test.20failure.html#203347225">(Jul 09 2020 at 03:09)</a>:</h4>
<p>But the post-processing obscures that.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>